<?
$title = "Delete category";
$pageid = "5";
$accessid = "a00";

require("required/dbconnect.php");
require("required/function.php");




if (isset($_POST['btnsubmit'])) {
    $id = $_POST['id'];
    $zone_id = $_POST['zone'];
    $courier_id = $_POST['courier_id'];
    
    $delete = mysql_query("delete from os_shipping_zone_country where id='$id'") or die(mysql_error());
    header("Location:shipping_zone_country.php?zone_id=$zone_id&id=$courier_id&action=4");
} else {
    require("required/header.php");

    $courier_id = $_GET['courier_id'];
    $zone_id = $_GET['zone_id'];
    $id = $_GET['id'];
    ?>
    <table width="95%" cellpadding="2" cellspacing="1">

        <td valign="top" align="center">
            <table width="100%" >
                <tr>
                    <td><div class="dw_notice">Confirm to delete the record?</div></td>
                </tr>
                <tr>
                    <td colspan="3" align="center">
                        <form action="<?= $_SERVER['PHP_SELF'] ?>" method="post">
                            <input type="hidden" value="<?= $id ?>" name="id">
                            <input type="hidden" value="<?= $courier_id ?>" name="courier_id">
                            <input type="hidden" value="<?= $zone_id ?>" name="zone_id">
                            <input type="submit" value="Yes" name='btnsubmit' class="button">
                            <input type="button" value="No" onClick="history.go(-1)" class="button">
                        </form>
                    </td>
                </tr>
            </table>
        </td>

    </table>
<? } require("required/footer.php"); ?>
